package org.pupil.common.constants;

/**
 * @Description: 序列化类型
 * @Author: pupil
 * @Date: 2024/07/06 下午 9:38
 */
public enum RpcSerialization {
    JSON("json"),
    JDK("jdk");

    public String name;

    RpcSerialization(String type) {
        this.name = type;
    }

    public static RpcSerialization get(String type){
        for (RpcSerialization rpcSerialization : values()) {
            if (rpcSerialization.name.equals(type)){
                return rpcSerialization;
            }
        }
        return null;
    }
}
